Skip to content

Conversation

felipepiovezan
Copy link

These are pointers to heap addresses that may sometimes be tagged.

git apple-llvm automerger and others added 30 commits June 12, 2025 14:01
…ift-to-6.2

🍒[lldb][Commands] Fix memory find for Swift expressions
In a thorny corner of the language C++ doesn't actually type check the
return type of a function passed into a std::function argument. Here
the type inference in the lambda resulted in a ChildInfo being
returned where an llvm::Expected<ChildInfo> was expected, which
through coincidence works very often, but not always, leading to a
crash.

rdar://153137542
[lldb] Add missing return type annotations
…_bp_filtering_release

[lldb][swift] Disable breakpoint filtering by default
…/remove-inlined-format

[lldb][Format] Display only the inlined Swift frame name in backtraces if available
…/use-common-pythonhome-to-6.2

🍒 [lldb] make lit use the same PYTHONHOME for building and testing (llvm#143183)
[lldb] Fix test when running on macOS 26.0
…okens (llvm#142452)

Sometimes, when a user writes invalid code, the minimization used for
scanning can create a stream of tokens that is invalid at lex time. This
patch protects against the case where there are valid (non-c++20) import
directives discovered in the middle of an invalid `import` declaration.

Mostly authored by: @akyrtzi
resolves: rdar://152335844

(cherry picked from commit 897b030)
Currently when jitting expressions, LLDB scans the IR instructions of
the `$__lldb_expr` and will insert a call to a utility function for each
load/store instruction. The purpose of the utility funciton is to
dereference the load/store operand. If that operand was an invalid
pointer the utility function would trap and LLDB asks the IR checker
whether it was responsible for the trap, in which case it prints out an
error message saying the expression dereferenced an invalid pointer.

This is a lot of setup for not much gain. In fact, creating/running this
utility expression shows up as ~2% of the expression evaluation time
(though we cache them for subsequent expressions). And the error message
we get out of it is arguably less useful than if we hadn't instrumented
the IR. It was also untested.

Before:
```
(lldb) expr int a = *returns_invalid_ptr()

error: Execution was interrupted, reason: Attempted to dereference an invalid pointer..
The process has been returned to the state before expression evaluation.
```

After:
```
(lldb) expr int a = *returns_invalid_ptr()

error: Expression execution was interrupted: EXC_BAD_ACCESS (code=1, address=0x5).
The process has been returned to the state before expression evaluation.
```

This patch removes this IR checker.

(cherry picked from commit 0a7b0c8)
…argets/frames (llvm#144503)

There's no need to create this utility function (and run it) for
targets/frames that aren't Objective-C/Objective-C++.

(cherry picked from commit 4ced29b)
artemcm and others added 16 commits July 17, 2025 08:56
…arget

[clang] Fix missing target info specifier on Global Variable linkage computation
…computation

A previous change (swiftlang#10555) added support for querying 'isWeakImported' to be parameterized on the enclosing target version to match 'CheckAvailability' and 'getAvailability'. We missed passing in this parameter in the Clang module code-gen when querying linkage for a global variable. This change adds the missing parameter and removes the default parameter from the query in order to avoid this kind of bug in the future.

Resolves rdar://154677999
…k swift PR testing

This test sometimes fails in swift PR testing with an assert in the remangler
rdar://156138054
[lldb][test] disable TestSwiftFoundationTypeNotification.py to unblock swift PR testing
…e's Link Libraries (swiftlang#10994) (swiftlang#11008)

This PR implements the C-APIs for a client can query a module's link libraries.

rdar://154807137
(cherry picked from commit 708340e)
…/lldb/swift-mangling

[Syntax Highlighting] Add name and parameters syntax highlighting in Swift backtraces
…y-forward-declaration

[feature availability] Don't disallow annotating ObjC interfaces and protocols with features when there are unannotated forward declarations of them
…y-protocol

[feature availability] Don't warn about unguarded uses of ObjC protocols adopted by interfaces
…ddress

[lldb] Add an extra optional did_read_live_memory to Target::ReadMemory  and [lldb] Implement LLDBMemoryReader::readRemoteAddressImpl
…ddress-6.2

[lldb] Add an extra optional did_read_live_memory to Target::ReadMemory  and [lldb] Implement LLDBMemoryReader::readRemoteAddressImpl
…TestSwiftAsyncHiddenFrames

[lldb] Disable TestSwiftAsyncHiddenFrames while it is investigated
@felipepiovezan felipepiovezan requested a review from a team as a code owner July 24, 2025 22:19
These are pointers to heap addresses that may sometimes be tagged.
@felipepiovezan felipepiovezan force-pushed the felipe/call_fixptr_swift_formatter branch from 8f13a70 to 4f083f6 Compare July 24, 2025 22:21
@felipepiovezan felipepiovezan changed the title Call FixDataAddress on task pointers before printing them [lldb][swift] Call FixDataAddress on task pointers before printing them Jul 24, 2025
@felipepiovezan felipepiovezan changed the base branch from stable/20240723 to stable/21.x August 27, 2025 21:38
@felipepiovezan felipepiovezan changed the base branch from stable/21.x to stable/20240725 August 27, 2025 21:38
@felipepiovezan felipepiovezan requested a review from dcci as a code owner August 27, 2025 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.